<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title><tiles:insertAttribute name="title" /></title>
<!-- <script>
            dojoConfig = {
                async: true,
                gfxRenderer: "canvas"
            };
      </script> -->
<script src='/_ah/channel/jsapi'></script>
<link rel="stylesheet" href="//ajax.googleapis.com/ajax/libs/dojo/1.7.1/dijit/themes/claro/claro.css">
<link rel="stylesheet" href="//ajax.googleapis.com/ajax/libs/dojo/1.7.1/dojox/grid/resources/claroGrid.css">
<link rel="stylesheet" href="//ajax.googleapis.com/ajax/libs/dojo/1.7.1/dojox/form/resources/FileInput.css" />
<link href="//fonts.googleapis.com/css?family=Open+Sans:300,400,600,700&amp;subset=latin" rel="stylesheet">
<script>
	 var dojoConfig = (function(){
		var base = location.href.split("/");
		base.pop();
		base = base.join("/");
		return {
			async: true,
			isDebug: true,
			packages: [	
	           	{ name: "dojoCustom",	location: base + "/dojoCustom"}
			 ]
		};
	})();
</script>
<script
	src="//ajax.googleapis.com/ajax/libs/dojo/1.7.1/dojo/dojo.js"
	data-dojo-config="isDebug: true, async: true">
		</script>

<link rel="stylesheet" href="<c:url value='/static/css/stakestyles.css' />" >
<script>
	var sessionToken; 
	<c:if test="${IS_CHAT_ENABLED_ATTR eq true}" >
		sessionToken =  '<c:out value="${USER_TOKEN_SESSION_ATTR }"></c:out>';
	</c:if>
</script>
<script src="/static/js/nexusHome.js" ></script>
<!-- <script src="/static/js/chatWindow.js" ></script> -->
</head>
<body class="claro">

	<div class="w-header-area" >
		<div id="" class="w-header-layer w-header-layer-text w-header-layer-align-left " style="
			left:5px; right:autopx; 
			top:18px; z-index: 20; display: block">
			<div class="w-header-layer-container">
				<div class="w-header-text-container" style="width: 50%; display: inline; float: left;">
					<img id="speaker-nexus-logo-image" alt="speaker nexus" src="/static/images/speaker_nexus_bold_logo.png">
				</div>
				
				<sec:authorize ifAnyGranted="ROLE_ADMIN, ROLE_USER" >
					<c:set var="isLoggedIn" value="true"> </c:set>
				</sec:authorize>
				<sec:authorize ifAllGranted="ROLE_ADMIN">
					<c:set var="isAdmin" value="true"> </c:set>
				</sec:authorize>
				<div id="login_ui" style="margin: 10px 50px 0 0; display: inline; float: right;"> 
					<ul style="margin: 15px 10px;">
						<sec:authorize ifAnyGranted="ROLE_ANONYMOUS">
							<li>
							<a style="color: white; padding: 4px;"  id="signup_home_button_id" class='signup_home_button' content-url="<c:url value="/public/login.htm?source=app"/>"	href="javascript:void(0)">Sign In</a></li>
						</sec:authorize>
						<sec:authorize ifNotGranted="ROLE_ANONYMOUS">
							<li > <a style="color: white; padding: 4px;"  class='signup_home_button menu_item_level2'  content-url="<c:url value='/profile/questionnaire.htm?userSetting=true' /> "   href="javascript:void(0)"><c:out	value="${sessionScope.sessionUserName}" /></a>   </li>
							
							<li><a style="color: white; padding: 4px;"  class='signup_home_button'  href="<c:url value="/j_spring_security_logout"/>">Logout</a>
							</li>
							
						</sec:authorize>
						<sec:authorize ifAnyGranted="ROLE_ADMIN"> 
							<li>
								<a class="menu_item_level2 signup_home_button" content-url="<c:url value='/admin/updateQuestions.htm' /> " style="color: white; padding: 4px;"   href="javascript:void(0)">Admin</a>
								</li>
						</sec:authorize>
					</ul>
				</div>
			</div>
		</div>
	</div>
	
	<c:choose>
		<c:when test="${isAdmin}">
			<c:set var="authHomeUrl" value="/public/welcomePane.htm"></c:set> 
			<c:set var="homeLabel" value="My Account"></c:set>
		</c:when>
		<c:when test="${isLoggedIn}">
			<c:set var="authHomeUrl" value="/profile/accountInfo.htm"></c:set> 
			<c:set var="homeLabel" value="My Account"></c:set>
		</c:when>
		<c:otherwise>
			<c:set var="authHomeUrl" value="/public/login.htm?source=app"></c:set>
			<c:set var="homeLabel" value="Home"></c:set>
		</c:otherwise>
	</c:choose>
					
	<div class="topmenu">
		<nav id="webs-nav-wrap">
			<ul id="webs-nav" class="webs-nav">
				<li style="margin-left: 20px;" class="nav_li main_nav_1 active">
					<a class="menu_item" nav-class="main_nav_1"   id="nav_item_1" href="javascript:void(0)" content-url="<c:url value="${authHomeUrl} "/>" title="Home">
						<span class="title">${homeLabel}</span><span class="after"></span>
					</a>
				</li>
				<li  class="nav_li main_nav_2"><a class="menu_item" nav-class="main_nav_2"  href="javascript:void(0)" title="Search" content-url='<c:url value="/profile/searchHomePane.htm?${isLoggedIn ? 'loggedIn=true' : ''}" />' ><span class="title">Search</span><span class="after"></span></a></li>
				<li class="nav_li main_nav_3"><a class="menu_item"  nav-class="main_nav_3" href="javascript:void(0)" title="About Us" content-url="/public/welcomePane.htm"><span class="title">About Us</span><span class="after"></span></a></li>
				<li class="nav_li main_nav_5"><a class="menu_item" nav-class="main_nav_5"  href="javascript:void(0)" title="Contact Us"><span class="title">Contact Us</span><span class="after"></span></a></li>
				<sec:authorize ifNotGranted="ROLE_ANONYMOUS">
					<li class="nav_li main_nav_7"><a content-url="/profile/messages.htm" class="menu_item" nav-class="main_nav_7"  href="javascript:void(0)" title="Messages"><span style="padding: 0 15px;" class="title">Messages</span><span class="after"></span></a></li>
				</sec:authorize>
			</ul>
		</nav>
	</div>
	<div id="contentpane" >
	
	</div>
	<p style="visibility: hidden; padding: 0; margin: 0;" id="lastRequest"></p> 
	<div id="nexus_footer">
		<ul style="width: 60%;">
			
			<li><a href="#">Privacy Policy</a>
			</li>
			<li><a href="#">Terms of Use</a>
			</li>
			<li><a href="#">Copyright</a>
			</li>
			<li><a id="stopAnim" href="javascript:void(0);">Feedback</a>
			</li>
			
			
		</ul>

	</div>
	
	

<style>
	img{
		margin: 0;
		padding: 0;
		border: 0;
	}
	
	img#speaker-nexus-logo-image{
		margin: 0;
		padding: 0;
		border: 0;
		height: 36px;
	}
	#login_ui ul li {
		border: none;
	}
	h3{
		color: #121212;
	}
	
	.imagecell{
		width: 90px;
		padding: 3px;
	}
	#contentpane {
		min-height: 500px;
		min-width: 920px;
		margin:  0 auto;
		padding : 10px 15px;
	}
	
	.profileWidget{
		display: inline-block;
		width: 450px;
	}
	
	.profileWidgetTable{
		background-color: white;
		width: 380px; 
		height: 90px;
		margin: 3px 3px 3px 3px;
	}
	
	.profileWidgetTable:HOVER{
		-moz-box-shadow: 5px 5px 2px #888888; /* Firefox 3.6 and earlier */
		box-shadow: 5px 5px 2px #888888;
	}
	
	.profileWidgetTable{
		/* IE10 Consumer Preview */ 
		background-image: -ms-linear-gradient(bottom, #FFFFFF 0%, #DEDAD2 100%);
		
		/* Mozilla Firefox */ 
		background-image: -moz-linear-gradient(bottom, #FFFFFF 0%, #DEDAD2 100%);
		
		/* Opera */ 
		background-image: -o-linear-gradient(bottom, #FFFFFF 0%, #DEDAD2 100%);
		
		/* Webkit (Safari/Chrome 10) */ 
		background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, #FFFFFF), color-stop(1, #DEDAD2));
		
		/* Webkit (Chrome 11+) */ 
		background-image: -webkit-linear-gradient(bottom, #FFFFFF 0%, #DEDAD2 100%);
		
		/* W3C Markup, IE10 Release Preview */ 
		background-image: linear-gradient(to top, #FFFFFF 0%, #DEDAD2 100%);
	}
	
	.profileWidgetTable td{
		padding: 0;
		line-height: normal;
	}
	
	.profileWidgetName{
		font-family: Georgia,times New Roman;
		font-size: 18px;
		padding-bottom: 4px;
		color: black;
	}
	
	.profileWidgetHeadline{
		font-family: Arial,Helvetica,Tahoma;
		font-size: 11px;
		
		color: black;
	}
	
	div.pagination {
	text-align: center;
	clear: both;
	padding: 20px;
	}
	
	div.pagination a {
	padding: 7px 10px 5px;
	margin: 0 2px;
	border-radius: 4px;
	-moz-border-radius: 4px;
	font: bold 14px "Helvetica",arial,sans-serf;
	background-color: #CCC;
	color: white;
	text-decoration: none;
	}
	
	div.pagination a:hover, div.pagination a.active {
	padding: 7px 10px 5px;
	margin: 0 2px;
	border-radius: 4px;
	-moz-border-radius: 4px;
	font: bold 14px "Helvetica",arial,sans-serf;
	background-color: #008EE8;
	color: white;
	text-decoration: none;
	}
	#imageContainerNode img{
		position: absolute;
		top: 100px;
		z-index: -1;
	}
	#textNode p{
		position: absolute;
		top: 220px;
		z-index: 99;
		font-family: 'comic sans ms';
		font-size: 29px;
		font-weight: bolder;
		line-height: 1.5em;
	}
	#slideShowContainer {
		height: 300px;
	}
	
	.profileWidgetTable a{
		text-decoration: none;
	}
	
	.boldfont{
		font-weight: bold;
	}
	
	.webs-home .title{
		margin: 0 25px;
	}
	
	a.widget_fancy_link{
		padding: 2px;
		margin: 0 2px;
		border-radius: 4px;
		-moz-border-radius: 4px;
		font: bold 14px "Helvetica",arial,sans-serf;
		background-color: #CCC;
		color: white;
		text-decoration: none;
	}
	
	a.widget_fancy_link:HOVER {
		padding: 2px;
		margin: 0;
		border-radius: 4px;
		-moz-border-radius: 4px;
		font: bold 14px "Helvetica",arial,sans-serf;
		background-color: #008EE8;
		color: white;
		text-decoration: none;
	}
	
</style>	
</body>

</html>